<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<include file="Public/header" />
</head>
<body>
<script type="text/javascript">
	var getbagInboundUrl="{:U('Bag/get_bagInbound')}";
	var bagInboundExamineUrl="{:U('Bag/examineBagInbound')}";//审核
	var bagInboundDelUrl="{:U('Bag/bagInboundDel')}";//删除
	var bagInboundClearUrl="{:U('Bag/bagInboundClear')}";//清空回收站
	var bagInboundUndoUrl="{:U('Bag/bagInboundUndo')}";//恢复回收站数据
	
	var storageListUrl="{:U('Tablelist/ajax_storagelist')}";//库位列表
	
	var inbound_order_no="{$order_no}";//单号
	
	<!-- using('../../../default/js/bagInbound.js'); -->
</script>
<script type="text/javascript" src="__PUBLIC__/default/js/bagInbound.js"></script>

	<table id="bagInboundDatagrid" toolbar="#bagInbound_tb"></table>
	<!-- 添加 -->
	<div id="bagInboundAddDialog" class="easyui-dialog" title="规则添加" style="width:500px;padding:10px 20px"
        closed="true" buttons="#bagInboundAddButtons"  modal="true">
         <form id="bagInboundAddForm" method="post" novalidate>
			<div class="fitem">
                <label>单号</label>
                <input name="order_no" id="inbound_order_no" class="easyui-textbox" data-options="readonly:true,required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>库位</label>
                <select class="easyui-combobox" name="storage_code" id='bagInboundstorage' data-options="height:30,required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                        <option value="0">未选择</option>
						<volist name="storage_list" id="vo">
							<option value="{$vo['storage_code']}">{$vo['name']}</option>
						</volist>
                </select>
            </div>
            <div class="fitem">
                <label>收件人姓名</label>
                <input name="receiver_name" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>收件人地址</label>
                <input name="receiver_address" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>收件人电话</label>
                <input name="receiver_phone" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>收件人邮编</label>
                <input name="receiver_code" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人姓名</label>
                <input name="sender_name" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人地址</label>
                <input name="sender_address" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人电话</label>
                <input name="sender_phone" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人邮编</label>
                <input name="sender_code" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>面单号</label>
                <input name="mail_no" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>包裹重量(kg)</label>
                <input name="weight" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,30]']" />
            </div>
			<div class="fitem">
                <label>包裹单价(￥)</label>
                <input name="price" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,30]']" />
            </div>
			<div class="fitem">
                <label>包裹总资费(￥)</label>
                <input name="total_price" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,30]']" />
            </div>
			<div class="fitem">
                <label>包裹备注</label>
                <input name="remark" class="easyui-textbox" data-options="delay:1000,height:30" />
            </div>

         </form>
    </div>
    <div id="bagInboundAddButtons">
    	<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="bagInboundObj.add('{:U('Bag/bagInboundAdd')}')" style="width:90px">添加</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#bagInboundAddDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /添加 -->
	<!-- 编辑 -->
    <div id="bagInboundEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#bagInboundEditButtons"  modal="true">
        <form id="bagInboundEditForm" method="post" novalidate>          
            <div class="fitem">
                <label>单号</label>
				<input type="hidden" name="id">
                <input name="order_no" class="easyui-textbox" data-options="readonly:true,required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			
			<div class="fitem">
                <label>库位</label>
                <select class="easyui-combobox" name="storage_code" id='groundingGroupEdit' data-options="height:30,required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                        <option value="0">未选择</option>
						<volist name="storage_list" id="vo">
							<option value="{$vo['storage_code']}">{$vo['name']}</option>
						</volist>
                </select>
            </div>
            <div class="fitem">
                <label>收件人姓名</label>
                <input name="receiver_name" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>收件人地址</label>
                <input name="receiver_address" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>收件人电话</label>
                <input name="receiver_phone" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>收件人邮编</label>
                <input name="receiver_code" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人姓名</label>
                <input name="sender_name" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人地址</label>
                <input name="sender_address" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人电话</label>
                <input name="sender_phone" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>寄件人邮编</label>
                <input name="sender_code" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>面单号</label>
                <input name="mail_no" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>包裹重量</label>
                <input name="weight" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,30]']" />
            </div>
			<div class="fitem">
                <label>包裹单价</label>
                <input name="price" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,30]']" />
            </div>
			<div class="fitem">
                <label>包裹总资费</label>
                <input name="total_price" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[1,30]']" />
            </div>
			<div class="fitem">
                <label>包裹备注</label>
                <input name="remark" class="easyui-textbox" data-options="delay:1000,height:30" />
            </div>
        </form>
    </div>
    <div id="bagInboundEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="bagInboundObj.save('{:U('Bag/bagInboundSave')}')" style="width:90px">更新</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#bagInboundEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /编辑 -->
    <!-- 搜索栏 -->
    <div id="bagInbound_tb">
        <form id="bagInboundSearchForm" method="post" novalidate>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon icon-all" plain="true" onclick="bagInboundObj.showAll()">全部</a>     
			 单号:<input class="easyui-textbox" name="order_no" style="width:150px;height:30px;"> 
			 收件人姓名:<input class="easyui-textbox" name="receiver_name" style="width:150px;height:30px;"> 
			 收件人电话:<input class="easyui-textbox" name="receiver_phone" style="width:150px;height:30px;"> 
			   
			 寄件人姓名:<input class="easyui-textbox" name="sender_name" style="width:150px;height:30px;"> 
			 寄件人电话:<input class="easyui-textbox" name="sender_phone" style="width:150px;height:30px;"> 
			 目标仓库:
			 <select class="easyui-combobox" name="depot_code" style="width:170px;height:30px;">
                 <volist name="depotlist" id="vo">
                     <option value="{$vo['code']}">{$vo['name']}</option>
                 </volist>
             </select>  
			<a href="#" class="easyui-linkbutton searchBar" iconCls="icon-search" style="height:30px;">搜索</a>
        </form>
		
		<a href="javascript:void(0)" onclick="bagInboundObj.addBar()" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true">添加</a>
        <a href="javascript:void(0)" onclick="bagInboundObj.editBar()" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true">修改</a>
        <a href="javascript:void(0)" onclick="bagInboundObj.removeBar()" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true">删除</a>
		<a href="javascript:void(0)" onclick="bagInboundObj.reloadBar()" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true">刷新</a>
		<a href="javascript:void(0)" onclick="bagInboundObj.saveBar()" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true">保存</a>
        <a href="javascript:void(0)" onclick="bagInboundObj.examineBar(1)" class="easyui-linkbutton" data-options="iconCls:'icon-key',plain:true">审核通过</a>
		<a href="javascript:void(0)" onclick="bagInboundObj.examineBar(2)" class="easyui-linkbutton" data-options="iconCls:'icon-key_delete',plain:true">审核不通过</a>
		<a href="javascript:void(0)" class="easyui-menubutton" data-options="menu:'#bag_mm1',iconCls:'icon-recycle'">回收站</a>
		<div id="bag_mm1" style="width:150px;">
			<div onclick="bagInboundObj.recycle()">查看</div>
			<div onclick="bagInboundObj.undoBar()" data-options="iconCls:'icon-undo'">恢复</div>
			<div onclick="bagInboundObj.clearBar()" data-options="iconCls:'icon-remove'">删除</div>
		</div>

    </div>
    <!-- /搜索栏 -->
</body>